3.307 \(\int \frac{a+b \log (c (d+e x)^n)}{(f+\frac{g}{x})^2 x^2} \, dx\)

Optimal. Leaf size=74 \[ -\frac{a+b \log \left (c (d+e x)^n\right )}{f (f x+g)}-\frac{b e n \log (d+e x)}{f (d f-e g)}+\frac{b e n \log (f x+g)}{f (d f-e g)} \]

[Out]

-((b*e*n*Log[d + e*x])/(f*(d*f - e*g))) - (a + b*Log[c*(d + e*x)^n])/(f*(g + f*x)) + (b*e*n*Log[g + f*x])/(f*(
d*f - e*g))

________________________________________________________________________________________

Rubi [A]  time = 0.0830582, antiderivative size = 74, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.148, Rules used = {2412, 2395, 36, 31} \[ -\frac{a+b \log \left (c (d+e x)^n\right )}{f (f x+g)}-\frac{b e n \log (d+e x)}{f (d f-e g)}+\frac{b e n \log (f x+g)}{f (d f-e g)} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*(d + e*x)^n])/((f + g/x)^2*x^2),x]

[Out]

-((b*e*n*Log[d + e*x])/(f*(d*f - e*g))) - (a + b*Log[c*(d + e*x)^n])/(f*(g + f*x)) + (b*e*n*Log[g + f*x])/(f*(
d*f - e*g))

Rule 2412

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_.)/(x_))^(q_.)*(x_)^(m_.), x_Symbol]
 :> Int[(g + f*x)^q*(a + b*Log[c*(d + e*x)^n])^p, x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, q}, x] && EqQ[m,
q] && IntegerQ[q]

Rule 2395

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((f + g
*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n]))/(g*(q + 1)), x] - Dist[(b*e*n)/(g*(q + 1)), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin{align*} \int \frac{a+b \log \left (c (d+e x)^n\right )}{\left (f+\frac{g}{x}\right )^2 x^2} \, dx &=\int \frac{a+b \log \left (c (d+e x)^n\right )}{(g+f x)^2} \, dx\\ &=-\frac{a+b \log \left (c (d+e x)^n\right )}{f (g+f x)}+\frac{(b e n) \int \frac{1}{(d+e x) (g+f x)} \, dx}{f}\\ &=-\frac{a+b \log \left (c (d+e x)^n\right )}{f (g+f x)}+\frac{(b e n) \int \frac{1}{g+f x} \, dx}{d f-e g}-\frac{\left (b e^2 n\right ) \int \frac{1}{d+e x} \, dx}{f (d f-e g)}\\ &=-\frac{b e n \log (d+e x)}{f (d f-e g)}-\frac{a+b \log \left (c (d+e x)^n\right )}{f (g+f x)}+\frac{b e n \log (g+f x)}{f (d f-e g)}\\ \end{align*}

Mathematica [A]  time = 0.0687515, size = 57, normalized size = 0.77 \[ \frac{\frac{b e n (\log (d+e x)-\log (f x+g))}{e g-d f}-\frac{a+b \log \left (c (d+e x)^n\right )}{f x+g}}{f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*(d + e*x)^n])/((f + g/x)^2*x^2),x]

[Out]

(-((a + b*Log[c*(d + e*x)^n])/(g + f*x)) + (b*e*n*(Log[d + e*x] - Log[g + f*x]))/(-(d*f) + e*g))/f

________________________________________________________________________________________

Maple [C]  time = 0.314, size = 354, normalized size = 4.8 \begin{align*} -{\frac{b\ln \left ( \left ( ex+d \right ) ^{n} \right ) }{ \left ( fx+g \right ) f}}-{\frac{-i\pi \,beg{\it csgn} \left ( i \left ( ex+d \right ) ^{n} \right ) \left ({\it csgn} \left ( ic \left ( ex+d \right ) ^{n} \right ) \right ) ^{2}+i\pi \,bdf{\it csgn} \left ( ic \right ) \left ({\it csgn} \left ( ic \left ( ex+d \right ) ^{n} \right ) \right ) ^{2}-i\pi \,beg{\it csgn} \left ( ic \right ) \left ({\it csgn} \left ( ic \left ( ex+d \right ) ^{n} \right ) \right ) ^{2}+i\pi \,bdf{\it csgn} \left ( i \left ( ex+d \right ) ^{n} \right ) \left ({\it csgn} \left ( ic \left ( ex+d \right ) ^{n} \right ) \right ) ^{2}+i\pi \,beg \left ({\it csgn} \left ( ic \left ( ex+d \right ) ^{n} \right ) \right ) ^{3}+i\pi \,beg{\it csgn} \left ( ic \right ){\it csgn} \left ( i \left ( ex+d \right ) ^{n} \right ){\it csgn} \left ( ic \left ( ex+d \right ) ^{n} \right ) -i\pi \,bdf \left ({\it csgn} \left ( ic \left ( ex+d \right ) ^{n} \right ) \right ) ^{3}-i\pi \,bdf{\it csgn} \left ( ic \right ){\it csgn} \left ( i \left ( ex+d \right ) ^{n} \right ){\it csgn} \left ( ic \left ( ex+d \right ) ^{n} \right ) +2\,\ln \left ( ex+d \right ) befnx-2\,\ln \left ( -fx-g \right ) befnx+2\,\ln \left ( ex+d \right ) begn-2\,\ln \left ( -fx-g \right ) begn+2\,\ln \left ( c \right ) bdf-2\,\ln \left ( c \right ) beg+2\,adf-2\,aeg}{ \left ( 2\,fx+2\,g \right ) f \left ( df-eg \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*(e*x+d)^n))/(f+g/x)^2/x^2,x)

[Out]

-b/f/(f*x+g)*ln((e*x+d)^n)-1/2*(-I*Pi*b*e*g*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2+I*Pi*b*d*f*csgn(I*c)*csgn(
I*c*(e*x+d)^n)^2-I*Pi*b*e*g*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2+I*Pi*b*d*f*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2
+I*Pi*b*e*g*csgn(I*c*(e*x+d)^n)^3+I*Pi*b*e*g*csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)-I*Pi*b*d*f*csgn(I
*c*(e*x+d)^n)^3-I*Pi*b*d*f*csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)+2*ln(e*x+d)*b*e*f*n*x-2*ln(-f*x-g)*
b*e*f*n*x+2*ln(e*x+d)*b*e*g*n-2*ln(-f*x-g)*b*e*g*n+2*ln(c)*b*d*f-2*ln(c)*b*e*g+2*a*d*f-2*a*e*g)/(f*x+g)/f/(d*f
-e*g)

________________________________________________________________________________________

Maxima [A]  time = 1.10073, size = 116, normalized size = 1.57 \begin{align*} -b e n{\left (\frac{\log \left (e x + d\right )}{d f^{2} - e f g} - \frac{\log \left (f x + g\right )}{d f^{2} - e f g}\right )} - \frac{b \log \left ({\left (e x + d\right )}^{n} c\right )}{f^{2} x + f g} - \frac{a}{f^{2} x + f g} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))/(f+g/x)^2/x^2,x, algorithm="maxima")

[Out]

-b*e*n*(log(e*x + d)/(d*f^2 - e*f*g) - log(f*x + g)/(d*f^2 - e*f*g)) - b*log((e*x + d)^n*c)/(f^2*x + f*g) - a/
(f^2*x + f*g)

________________________________________________________________________________________

Fricas [A]  time = 2.03052, size = 215, normalized size = 2.91 \begin{align*} -\frac{a d f - a e g +{\left (b e f n x + b d f n\right )} \log \left (e x + d\right ) -{\left (b e f n x + b e g n\right )} \log \left (f x + g\right ) +{\left (b d f - b e g\right )} \log \left (c\right )}{d f^{2} g - e f g^{2} +{\left (d f^{3} - e f^{2} g\right )} x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))/(f+g/x)^2/x^2,x, algorithm="fricas")

[Out]

-(a*d*f - a*e*g + (b*e*f*n*x + b*d*f*n)*log(e*x + d) - (b*e*f*n*x + b*e*g*n)*log(f*x + g) + (b*d*f - b*e*g)*lo
g(c))/(d*f^2*g - e*f*g^2 + (d*f^3 - e*f^2*g)*x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*(e*x+d)**n))/(f+g/x)**2/x**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.30473, size = 150, normalized size = 2.03 \begin{align*} \frac{b f n x e \log \left (f x + g\right ) - b f n x e \log \left (x e + d\right ) + b g n e \log \left (f x + g\right ) - b d f n \log \left (x e + d\right ) - b d f \log \left (c\right ) + b g e \log \left (c\right ) - a d f + a g e}{d f^{3} x - f^{2} g x e + d f^{2} g - f g^{2} e} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))/(f+g/x)^2/x^2,x, algorithm="giac")

[Out]

(b*f*n*x*e*log(f*x + g) - b*f*n*x*e*log(x*e + d) + b*g*n*e*log(f*x + g) - b*d*f*n*log(x*e + d) - b*d*f*log(c)
+ b*g*e*log(c) - a*d*f + a*g*e)/(d*f^3*x - f^2*g*x*e + d*f^2*g - f*g^2*e)